/**
 * Created by zhaiyunzhi on 2017/1/3.
 */
import api from './config'

export function createUser(param) {
    return api.post('api/user/createUser',{
        username:param.username,
        pwd:param.pwd,
        realname:param.realname,
        phone:param.phone,
        email:param.email,
        role_id:param.role_id,
        dealer_id:param.dealer_id
    });
}
export function updateUser(param) {
    return api.post('api/user/updateUser',{
        user_id:param.user_id,
        pwd:param.pwd,
        realname:param.realname,
        phone:param.phone,
        email:param.email,
        role_id:param.role_id,
        dealer_id:param.dealer_id
    });
}
export function deleteUser(user_id) {
    return api.post('api/user/deleteUser', {
        user_id: user_id
    });
}
export function getUserList() {
    return api.post('api/user/getUserList', {
    });
}

export function getUserDetail(user_id) {
    return api.post('api/user/getUserDetail', {
        user_id:user_id
    });
}

export function getSaleUserList() {
    return api.post('api/user/getSaleUserList', {
    });
}